#define _CRT_SECURE_NO_WARNINGS 1


#include<iostream>

using namespace std;

int main()
{
	int n = 0;
	cin >> n;

	if (n <= 15)
	{
		cout << n * 2 << endl;
	}
	else
	{
		cout << 30 + (n - 15) * 3 << endl;
	}

	return 0;
}